# -*-coding:utf-8 -*-
"""
Definition of urls for ed_board.
"""
from django.conf import settings
from datetime import datetime
from django.urls import path, include, re_path
import django.contrib.auth.views
import xadmin

from django.contrib import admin
from django.conf import settings
from rest_framework.documentation import include_docs_urls
# admin.autodiscover()
api_urls = ([
    path(r'', include('core.api.urls')),
    path(r'', include('portal.api.urls')),
    path(r'', include('org.api.urls')),
    path(r'', include('content.api.urls')),
    path(r'', include('schedule.api.urls')),
    path(r'', include('asset.api.urls')),
    path(r'', include('search.api.urls')),
], "api")

urlpatterns = [
    path(r'edboard/admin/', xadmin.site.urls),
    path(r'edboard/api/auth/', include('rest_framework.urls', namespace='rest_framework')),
    path(r'edboard/api/', include('restdoc.urls', namespace='restdocs')),
    path(r'edboard/api/', include(api_urls, namespace='api')),
    # url(r'^edboard/', include('search.urls', namespace='search')),
]

if settings.DEBUG:
    from django.conf.urls.static import static
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
